<template>
  <span class="clock">{{ time }}</span>
</template>

<script>
import { dateFormat } from "@/api/home";
export default {
  data() {
    return {
      time: "18:00:00"
    };
  },

  mounted() {
    setInterval(this.getTime, 1000);
  },

  methods: {
    getTime() {
      this.time = dateFormat("HH:MM:SS", new Date());
    }
  }
};
</script>

<style scoped>
.clock {
  font-size: 500%;
  color: rgb(255, 255, 255);
}
</style>
